﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DealerSearch.aspx.cs" Inherits="CRM.Web.VehicleManage.DealerSearch" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <base target="_self"/>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/pop.css" %>" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    <script type="text/javascript">
        function setValue(dealerCode, dealerName, marketDepartmentCode, marketDepartmentName, dealerId, marketDepartmentId) {
            var win;
            if (window.opener != null) {
                win = window.opener;
            }
            else if (window.dialogArguments != null) {
                win = window.dialogArguments;
            }
            if (typeof (win) != "undefined" || typeof (win) != "null") {
                win.SetDealerInfo(dealerCode, dealerName, marketDepartmentCode, marketDepartmentName, dealerId, marketDepartmentId);
            }
            closeSelf();
            return false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server"  defaultbutton="btnSearch" >
<table border="0" cellpadding="0" cellspacing="0" id="tTitle">
    <tr>
	<td class="left">
	    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
	</td>
	<td class="middle">

    <div class="pagetitle">
        <div><asp:Label ID="lblTitle" runat="server" Text="经销商信息查询" ></asp:Label></div>
    </div>
	
	</td>
	<td class="right">
	    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
	</td>
    </tr>
</table>
    <div id="divMainPop" >
    <div style="width: 100%">
        <div class="listdiv">
            <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                <tr>
                    <td class="title"><div  class="nowrap">
                        经销商名称:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtDEALERNAME" runat="server" CssClass="txt" MaxLength="128" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title"><div  class="nowrap">
                        经销商代码:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtDEALERCODE" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title"><div  class="nowrap">
                        市场部名称:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtMARKETDEPARTMENTNAME" runat="server" CssClass="txt" MaxLength="128"
                            Rows="3" TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title">
                        &nbsp;
                    </td>
                    <td class="content"><div style="width: 200px; " class="nowrap">
                        <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                            OnClick="btnSearch_Click" />
                        <input id="btnClose" type="button" value="关闭" class="btn" onclick="closeSelf();" /></div>
                    </td>
                </tr>
		    </table>   
            <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="true" 
                AllowSorting="true" PageSize="10"  SortExpressionValue="DEALERID">
                <Columns>
			    <asp:BoundField DataField="DEALERID" HeaderText="经销商编号"  SortExpression="DEALERID" Visible="False" />
			    <asp:BoundField DataField="DEALERNAME" HeaderText="经销商名称"  SortExpression="DEALERNAME" />
			    <asp:BoundField DataField="DEALERCODE" HeaderText="经销商代码"  SortExpression="DEALERCODE" />
			    <asp:BoundField DataField="MARKETDEPARTMENTID" HeaderText="市场部编号"  SortExpression="MARKETDEPARTMENTID"  Visible="False" />
			    <asp:BoundField DataField="MARKETDEPARTMENTCODE" HeaderText="市场部代码"  SortExpression="MARKETDEPARTMENTCODE" />
			    <asp:BoundField DataField="MARKETDEPARTMENTNAME" HeaderText="市场部名称"  SortExpression="MARKETDEPARTMENTNAME" />
			    <asp:BoundField DataField="DEPLOYNAME" HeaderText="部署名称"  SortExpression="DEPLOYNAME"  Visible="False" />
			    <asp:BoundField DataField="CATEGORY" HeaderText="类型"  SortExpression="CATEGORY"  Visible="False" />
			    <asp:BoundField DataField="CORPTYPE" HeaderText="企业类型"  SortExpression="CORPTYPE"  Visible="False" />
			    <asp:BoundField DataField="CENTCORP" HeaderText="是否中心企业"  SortExpression="CENTCORP"  Visible="False" />
			    <asp:BoundField DataField="TEMPLATENAME" HeaderText="模板名称"  SortExpression="TEMPLATENAME"  Visible="False" />
			    <asp:BoundField DataField="DISTRICT" HeaderText="区域名称"  SortExpression="DISTRICT" />
			    <asp:BoundField DataField="PROVINCE" HeaderText="省份名称"  SortExpression="PROVINCE" Visible="False"/>
			    <asp:BoundField DataField="CITY" HeaderText="城市名称"  SortExpression="CITY" Visible="False"/>
			    <asp:BoundField DataField="COUNTY" HeaderText="县区名称"  SortExpression="COUNTY" Visible="False"/>
			    <asp:BoundField DataField="BANKNAME" HeaderText="银行名称"  SortExpression="BANKNAME"  Visible="False" />
			    <asp:BoundField DataField="BANKACCOUNT" HeaderText="银行帐号"  SortExpression="BANKACCOUNT"  Visible="False" />
			    <asp:BoundField DataField="TAXCODE" HeaderText="税号"  SortExpression="TAXCODE"  Visible="False" />
			    <asp:BoundField DataField="PHONE" HeaderText="电话"  SortExpression="PHONE" />
			    <asp:BoundField DataField="ADDRESS" HeaderText="地址"  SortExpression="ADDRESS" Visible="False"  />
			    <asp:BoundField DataField="POSTCODE" HeaderText="邮编"  SortExpression="POSTCODE"  Visible="False" />
			    <asp:BoundField DataField="EMAIL" HeaderText="E-mail"  SortExpression="EMAIL"  Visible="False" />
			    <asp:BoundField DataField="ABBR" HeaderText="简称"  SortExpression="ABBR"  Visible="False" />
			    <asp:BoundField DataField="PYCODE" HeaderText="拼音代码"  SortExpression="PYCODE"  Visible="False" />
			    <asp:BoundField DataField="PRESIDENT" HeaderText="总经理"  SortExpression="PRESIDENT" />
			    <asp:BoundField DataField="PRESIDENTPHONE" HeaderText="经理电话"  SortExpression="PRESIDENTPHONE" />
			    <asp:BoundField DataField="LINKMAN" HeaderText="联系人"  SortExpression="LINKMAN"  Visible="False" />
			    <asp:BoundField DataField="LINKPHONE" HeaderText="联系电话"  SortExpression="LINKPHONE"  Visible="False" />
			    <asp:BoundField DataField="WORKPHONE" HeaderText="值班电话"  SortExpression="WORKPHONE"  Visible="False" />
			    <asp:BoundField DataField="MTLIVCCFT" HeaderText="材料费开票系数"  SortExpression="MTLIVCCFT"  Visible="False" />
			    <asp:BoundField DataField="MTLIVCKIND" HeaderText="材料费开票类型"  SortExpression="MTLIVCKIND"  Visible="False" />
			    <asp:BoundField DataField="TAXRATE" HeaderText="税率"  SortExpression="TAXRATE" Visible="False"  />
			    <asp:BoundField DataField="WRKIVCKIND" HeaderText="工时费开票类型"  SortExpression="WRKIVCKIND"  Visible="False" />
			    <asp:BoundField DataField="WRKIVCCFT" HeaderText="工时费开票系数"  SortExpression="WRKIVCCFT"  Visible="False" />
			    <asp:BoundField DataField="INVOICEMAXFEE" HeaderText="最大开票金额"  SortExpression="INVOICEMAXFEE"  Visible="False" />
			    <asp:BoundField DataField="WRKLEVEL" HeaderText="工时等级"  SortExpression="WRKLEVEL"  Visible="False" />
			    <asp:BoundField DataField="MNGLEVEL" HeaderText="管理费率等级"  SortExpression="MNGLEVEL"  Visible="False" />
			    <asp:BoundField DataField="OLDMANAGERATE" HeaderText="旧件管理费率"  SortExpression="OLDMANAGERATE"  Visible="False" />
			    <asp:BoundField DataField="WCFLEVEL" HeaderText="外出路途补助等级"  SortExpression="WCFLEVEL"  Visible="False" />
			    <asp:BoundField DataField="SETUPTIME" HeaderText="开业时间"  SortExpression="SETUPTIME"  Visible="False" />
			    <asp:BoundField DataField="REMOVALTIME" HeaderText="注销时间"  SortExpression="REMOVALTIME"  Visible="False" />
			    <asp:BoundField DataField="FAX" HeaderText="传真"  SortExpression="FAX"  Visible="False" />
			    <asp:BoundField DataField="STATUS" HeaderText="状态"  SortExpression="STATUS" />
			    <asp:BoundField DataField="CREATETIME" HeaderText="创建时间"  SortExpression="CREATETIME"  Visible="False" />
			    <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号"  SortExpression="CREATEPEOPLEID" Visible="False"  />
			    <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人"  SortExpression="CREATEPEOPLE" Visible="False"  />
			    <asp:BoundField DataField="LASTMODIFYPEOPLEID" HeaderText="最后修改人编号"  SortExpression="LASTMODIFYPEOPLEID" Visible="False"  />
			    <asp:BoundField DataField="LASTMODIFYPEOPLE" HeaderText="最后修改人"  SortExpression="LASTMODIFYPEOPLE" Visible="False"  />
			    <asp:BoundField DataField="LASTMODIFYTIME" HeaderText="最后修改时间"  SortExpression="LASTMODIFYTIME" Visible="False" />
			    <asp:BoundField DataField="REMARK" HeaderText="备注"  SortExpression="REMARK"  Visible="False" />
			    <asp:BoundField DataField="BUSINESSDIVISIONID" HeaderText="事业部编号"  SortExpression="BUSINESSDIVISIONID"  Visible="False" />
			    <asp:BoundField DataField="BUSINESSDIVISIONNAME" HeaderText="事业部名称"  SortExpression="BUSINESSDIVISIONNAME"  Visible="False" />
			    <asp:BoundField DataField="BUSINESSDIVISIONCODE" HeaderText="事业部代码"  SortExpression="BUSINESSDIVISIONCODE"  Visible="False" />
			    <asp:TemplateField HeaderText="操作" ShowHeader="False">
                    <itemtemplate>
                    <div style="white-space: nowrap;">
                    <asp:LinkButton ID="lbtnSelected"  runat="server" Text="选中"  OnClientClick='<%# SelectedCommand(Eval("DEALERCODE").ToString(), Eval("DEALERNAME").ToString(), Eval("MARKETDEPARTMENTCODE").ToString(), Eval("MARKETDEPARTMENTNAME").ToString(), Eval("DEALERID").ToString(), Eval("MARKETDEPARTMENTID").ToString()) %>' ></asp:LinkButton>
				    <asp:HyperLink id="hlModify" runat="server"  Visible="False" NavigateUrl='<%# Eval("DEALERID", ModifyUrl) %>'>详细</asp:HyperLink>
                    <asp:LinkButton id="lbtnDelete" runat="server" Visible="False"  Text="删除" CommandName="Delete" CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>            
                    </div>
				    </itemtemplate>
                </asp:TemplateField>
                </Columns>	
                <RowStyle CssClass="row" />
                <AlternatingRowStyle CssClass="row2" />
                <HeaderStyle CssClass="header" />	
                <PagerStyle CssClass="pager" />	
            </dp:WebGridView>
        </div>
    </div>
    </div>
    </form>
</body>
</html>
